package com.zpark.jsoup;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.IOException;

/**
 * @PackageName: com.zpark.jsoup
 * @ClassName: Demo08
 * @Description:
 * @author: RZS
 * @date: 2021/8/15  23:47
 */
public class Demo08 {
    public static void main(String[] args) throws IOException {
        Document document = Jsoup.connect("https://y.qq.com").get();
        Elements elements = document.select("meta[name=description]");
        for (Element element : elements) {
            System.out.println("元描述: "+element.attr("content"));
        }

        Elements elements1 = document.select("meta[name=keywords]");
        for (Element element : elements1) {
            System.out.println("元标签: "+element.attr("content"));
        }
    }
}
